home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
util2
/
createdi.lha
/
CreateDI
/
cinfo
< prev
next >
Wrap
Text File
|
1995-12-07
|
1KB
|
66 lines
/*
$VER: CInfo V1.0 - Create Infofile for datafiles/drawer (1995/12/07)
*/
Arg Dir Options
say
say 'CInfo V1.0 (Create Infofile for datafiles/drawers)'
say 'By christer.bjarnemo@mailbox.swipnet.se'
say ''
If Dir = '?' | Dir = '/?' | Dir = '-?' | Dir = '' then signal Usage
if upper(Dir) = '-R' | upper(options) = '-R' then do
dir = ''
options = 'all'
end
Address COMMAND 'list 'Dir' PAT ~(#?.info) FILES LFORMAT "%p%n" 'options' >t:CInfo.temp'
Call Open(list,'t:CInfo.temp','R')
DO forever
Line = ReadLN(list)
File = line
if eof(list) then break
NewFile = File'.info'
If ~EXISTS(newfile) then do
say 'Creating 'newfile
address command 'copy env:sys/def_tool.info to 'newfile
end
else say '* Skipping 'newfile', file already exists...'
END
Call Close(list)
Address COMMAND 'list 'Dir' PAT ~(#?.info) DIRS LFORMAT "%p%n" 'options' >t:CInfo.temp'
Call Open(list,'t:CInfo.temp','R')
DO forever
Line = ReadLN(list)
File = line
if eof(list) then break
NewFile = File'.info'
If ~EXISTS(newfile) then do
say 'Creating 'newfile' (drawer)'
address command 'copy env:sys/def_drawer.info to 'newfile
end
else say '* Skipping 'newfile', file already exists...'
END
Call Close(list)
Address COMMAND 'Delete >NIL: t:CInfo.temp'
say
say 'Operation complete.'
say
EXIT
Usage:
say 'Usage: CInfo <dir> [options]'
say
say 'Available options:'
say '-r Recursive'
say
EXIT